'''
CodeJam Practice 
Created on 2012-12-20

@author: festony
'''

from cj_lib import *
from properties import *

import math
import fractions


curr_file_name = 'C-large-practice'
#curr_file_name = 'C-small-practice'
#curr_file_name = 'test'

# map(int, input_lines.pop(0).split(' '))

def input_dividing_func(input_lines):
    total_case = int(input_lines.pop(0))
    case_inputs = []
    for i in range(total_case):
        input_lines.pop(0)
        case_inputs.append(map(int, input_lines.pop(0).split(' ')))
    return case_inputs
    
def process_func(func_input):
    print func_input
    candy = func_input
    xor = 0
    for c in candy:
        xor ^= c
    if xor != 0:
        return 'NO'
    return sum(candy) - min(candy)

run_proc(process_func, input_dividing_func, curr_working_folder, curr_file_name)


